Integrand size = 21, antiderivative size = 40 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2}{d (1-\cos (c+d x))}-\frac {a^2 \log (1-\cos (c+d x))}{d} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3964, 45} \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2}{d (1-\cos (c+d x))}-\frac {a^2 \log (1-\cos (c+d x))}{d} \]
[In]
[Out]
Rule 45
Rule 3964
Rubi steps \begin{align*} \text {integral}& = -\frac {a^4 \text {Subst}\left (\int \frac {x}{(a-a x)^2} \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {a^4 \text {Subst}\left (\int \left (\frac {1}{a^2 (-1+x)^2}+\frac {1}{a^2 (-1+x)}\right ) \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {a^2}{d (1-\cos (c+d x))}-\frac {a^2 \log (1-\cos (c+d x))}{d} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.40 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 \csc ^2\left (\frac {1}{2} (c+d x)\right ) \left (-1-2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 \cos (c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.75 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.72
method | result | size |
risch | \(i a^{2} x +\frac {2 i a^{2} c}{d}+\frac {2 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{2}}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(69\) |
derivativedivides | \(\frac {-\frac {a^{2}}{2 \sin \left (d x +c \right )^{2}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(93\) |
default | \(\frac {-\frac {a^{2}}{2 \sin \left (d x +c \right )^{2}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(93\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.20 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} - {\left (a^{2} \cos \left (d x + c\right ) - a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{d \cos \left (d x + c\right ) - d} \]
[In]
[Out]
\[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \cot ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{3}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.85 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {a^{2}}{\cos \left (d x + c\right ) - 1}}{d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 111 vs. \(2 (37) = 74\).
Time = 0.35 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.78 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {2 \, a^{2} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 2 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac {{\left (a^{2} + \frac {2 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1}}{2 \, d} \]
[In]
[Out]
Time = 13.86 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.25 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2\,\left (\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \]
[In]
[Out]